/** @format */

import { ConfigProvider, Flex } from "antd";
import { Suspense } from "react";
import Head from "./page/head";
import { useRoutes } from "react-router-dom";
import { router } from "./router";
import style from "./App.module.less";
import zhCN from "antd/es/locale/zh_CN";

const themeConfig = {
  token: {
    colorPrimary: "rgb(39, 102, 146)", // 设定全局主色调
  },
  components: {
    Menu: {
      itemColor: "rgb(39, 102, 146)", // 菜单文字颜色
      activeBarHeight: 3, // 选中菜单项的底部条高度
    },
  },
};

function App() {
  return (
    <div>
      <Suspense fallback={<div>loding</div>}>
        <ConfigProvider locale={zhCN} theme={themeConfig}>
          {useRoutes(router)}
        </ConfigProvider>
      </Suspense>
    </div>
  );
}

export default App;
